﻿cmake_minimum_required (VERSION 3.10)

project(AsyncLogger LANGUAGES CXX)

file(GLOB SRCS "./*.cpp")

set(STATIC_LIB ${PROJECT_NAME}-static)

foreach(cppfile IN LISTS SRCS)
	message(STATUS "add ${cppfile} to ${STATIC_LIB}")
endforeach()

add_library(${STATIC_LIB} STATIC
	${SRCS}
)

target_include_directories(${STATIC_LIB} PUBLIC
	"./"
)

if(WIN32)
target_link_libraries(${STATIC_LIB} PUBLIC
#	ws2_32
)
else()
target_link_libraries(${STATIC_LIB} PUBLIC
	pthread
)
endif()

# TODO: 如有需要，请添加测试并安装目标。
